lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

Signal handling.html (2092B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3 <html><head><link rel="stylesheet" href="sitewide.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="exporter-version" content="Evernote Mac 7.6 (457297)"/><meta name="altitude" content="-1.633376002311707"/><meta name="author" content="Alex Balgavy"/><meta name="created" content="2018-12-03 16:04:05 +0000"/><meta name="latitude" content="52.33331298828125"/><meta name="longitude" content="4.866615317820796"/><meta name="source" content="desktop.mac"/><meta name="updated" content="2018-12-14 15:38:32 +0000"/><title>Signal handling</title></head><body><div>types:</div><ul><li><div>hardware-induced (e.g SIGILL)<br/></div></li><li><div>software-induced (e.g SIGQUIT, SIGPIPE)</div></li></ul><div style="-en-paragraph:true;"><span style="-en-paragraph:true;"><br/></span></div><div style="-en-paragraph:true;"><span style="-en-paragraph:true;">actions (responses):</span></div><ul><li><div>Term (terminate), Ign (ignore), Core (terminate execution &amp; OS core dump), Stop (stop execution, freeze process), Cont (continue, unfreeze processs)</div></li><li><div>Default action on per-signal basis, which is typically overridable (but some aren't, like SIGKILL)</div></li><li><div>signals can typically be blocked and actions delayed (but again, some exceptions)</div></li></ul><div style="-en-paragraph:true;"><span style="-en-paragraph:true;"><br/></span></div><div style="-en-paragraph:true;"><span style="-en-paragraph:true;">catching signals:</span></div><ul><li><div>process registers signal handler</div></li><li><div>OS delivers signal, allows process to run handler</div></li><li><div>current execution context has to be saved/restored</div></li></ul><div><br/></div><div>diagram example:</div><div><br/></div><div style="-en-paragraph:true;"><img src="Signal%20handling.resources/1DC10193-BD5C-495D-BA4E-2D5E9A9BF185.png" height="755" width="816"/></div><div><br/></div></body></html>